package com.googlecode.tinyjava.syntaxtree;

import lombok.Getter;
import lombok.Setter;

public class Unary extends MonadicExpression {

	@Getter
	@Setter
	TreeNode node;

	public Unary(TreeNode node) {
		super();
		this.node = node;
	}

	public Unary(String operator) {
		this.operator = operator;
	}

	public void print() {
		if (!"+".equals(operator))
			System.out.print(operator + " ");
		node.print();
	}
}
